package com.tengyun.middleplatform.trade.tradedata.service.impl;

import com.tengyun.middleplatform.trade.tradedata.service.INoticeService;
import com.tengyun.middleplatform.trade.tradedata.util.mq.MessageBody;
import com.tengyun.middleplatform.trade.tradedata.util.mq.MessageParsing;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import javax.annotation.Resource;

/**
 * @Author: likailun
 * @Description:
 * @Date: create in 2022/8/29 2:53 PM
 */
@Slf4j
@Service
public class NoticeServiceImpl implements INoticeService {
    @Resource
    private MessageParsing messageParsing;
    @Override
    public void orderNotice(String message) {
        MessageBody msgBody = messageParsing.get(message);
        String messageType = msgBody.getMessageType();
        if (StringUtils.isEmpty(messageType)) {
            messageType = msgBody.getCmdStr();
        }

    }
}
